package com.hxc.service.impl;

import com.hxc.entity.EmpLog;
import com.hxc.mapper.EmpLogMapper;
import com.hxc.service.EmpLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class EmpLogServiceImpl implements EmpLogService {
    @Autowired
    private EmpLogMapper empLogMapper;
    /**
     * 员工信息插入日志
     * */
    @Transactional(propagation = Propagation.REQUIRES_NEW) //设置事务传播行为
    @Override
    public void insertLog(EmpLog empLog) {
        empLogMapper.insert(empLog);
    }

}
